Save original image - PSF fit and display during checkmag stage #151
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.


The residual image shown when you run
--s psfmag --showis different from what is shown by thecheckmagstage. Specifically, thecheckmagstage shows the residual of the PSF fitting - which is done after the 2D polynomial subtraction. This means that you are seeing the combined background subtraction plus PSF subtraction. On the other hand, the psfmag stage shows the original image with just the PSF subtraction. I've been going back and forth about what is most useful. This PR adds the "original - PSF fit" to thedisplay_psf_fitfunction which is called during thecheckmagstage and when you click on points during thegetmagstage. This requires saving this image to the data directory - so when this file is not present the code gracefully only displays the original two images.I tested this on two supernova:
SN2025tis does not have the new file:
lscloop.py -n 2025tis -e 20250807 --id 328 -f B -s checkmagThis will bring up a plot with two subplots
SN2025ngs has been run with the new code:
This will bring up a plot with three subplots